import request from '@/config/axios'

export interface ResearchVO {
  id: number
  major: number
  studentNumber: number
  studentName: string
  projectName: string
  projectNumber: number
  projectSource: string
  projectHead: string
  remark: string
  status: number
  reason: string
}

// 查询教师科研项目情况列表
export const getResearchPage = async (params) => {
  return await request.get({ url: `/data/research/page`, params })
}

// 查询教师科研项目情况详情
export const getResearch = async (id: number) => {
  return await request.get({ url: `/data/research/get?id=` + id })
}

// 新增教师科研项目情况
export const createResearch = async (data: ResearchVO) => {
  return await request.post({ url: `/data/research/create`, data })
}

// 修改教师科研项目情况
export const updateResearch = async (data: ResearchVO) => {
  return await request.put({ url: `/data/research/update`, data })
}

// 修改教师科研项目情况
export const updateResearchStatus = async (data: ResearchVO) => {
  return await request.put({ url: `/data/research/updateStatus`, data })
}

// 删除教师科研项目情况
export const deleteResearch = async (id: number) => {
  return await request.delete({ url: `/data/research/delete?id=` + id })
}

// 导出教师科研项目情况 Excel
export const exportResearch = async (params) => {
  return await request.download({ url: `/data/research/export-excel`, params })
}
